<!DOCTYPE html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>疫情信息管理后台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" th:href="@{/assets/css/bootstrap.mincopy.css}">
    <link rel="stylesheet" th:href="@{/assets/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/assets/css/metisMenu.css}">
    <link rel="stylesheet" th:href="@{/assets/css/typography.css}">
    <link rel="stylesheet" th:href="@{/assets/css/styles.css}">

</head>

<body>
<div id="preloader">
    <div class="loader"></div>
</div>
<!-- preloader area end -->
<!-- page container area start -->
<form id="form" action="/admin/listdata" method="post">
    <div class="page-container">

        <!-- sidebar menu area start -->
        <div class="sidebar-menu">
            <div class="main-menu">
                <div class="menu-inner" style="width: 100%; height: 500px; overflow: hidden;">
                    <nav>
                        <ul class="metismenu" id="menu">
                            <li class="active">
                                <a href="javascript:void(0)" aria-expanded="true">
                                    <span>疫情信息管理</span>
                                </a>
                                <ul class="collapse">
                                    <li class="active"><a th:href="@{/admin/data}">数据管理</a></li>
                                </ul>
                                <ul class="collapse">
                                    <li><a th:href="@{/admin/riskdata}">风险数据</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true">
                                    <span>用户管理</span>
                                </a>
                                <ul class="collapse">
                                    <li ><a th:href="@{/userManger/toUserMessage}">用户信息</a></li>
                                </ul>
                            </li>
                            <li>
                                <a href="javascript:void(0)" aria-expanded="true">
                                    <span>管理员信息</span>
                                </a>
                                <ul class="collapse">
                                    <li><a th:href="@{/adminManger/message}">当前账号</a></li>
                                </ul>
                                <ul class="collapse" th:if="${roles} eq ROLE_ROOT">
                                    <li><a th:href="@{/root/toShow}">管理账号</a></li>
                                </ul>
                                <ul class="collapse" th:if="${roles} eq ROLE_ROOT">
                                    <li><a th:href="@{/root/toAdd}">增加管理员</a></li>
                                </ul>
                            </li>
                            <li><a th:href="@{/admin/logout}"><span>退出登录</span></a></li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
        <!-- sidebar menu area end -->
        <!-- main content area start -->
        <div class="main-content">
            <!-- header area start -->
            <div class="header-area">
                <div class="row align-items-center">
                    <!-- nav and search button -->
                    <div>
                        <div class="nav-btn pull-left">
                            <span></span>
                            <span></span>
                            <span></span>
                        </div>
                        <br>
                        <br>


                        <div form-group>
                            <div>
                                <a  onclick="sortDate()" class="btn btn-outline-info" style="height: 30px" th:if="${sort != 'date' && sort != 'date desc'}">时间</a>
                                <a  onclick="sortDate()" class="btn btn-outline-info" style="height: 30px" th:if="${sort} == 'date'">时间升序</a>
                                <a  onclick="sortDate()" class="btn btn-outline-info" style="height: 30px" th:if="${sort} == 'date desc'">时间降序</a>
                                <a  onclick="sortTemperature()" class="btn btn-outline-info" style="height: 30px" th:if="${sort != 'temperature' && sort != 'temperature desc'}">温度</a>
                                <a  onclick="sortTemperature()" class="btn btn-outline-info" style="height: 30px" th:if="${sort} == 'temperature'">温度升序</a>
                                <a  onclick="sortTemperature()" class="btn btn-outline-info" style="height: 30px" th:if="${sort} == 'temperature desc'">温度降序</a>
                                <a  onclick="selectBody()" class="btn btn-outline-info" style="height: 30px" th:if="${body != '=' && body != '!='}">身体状况</a>
                                <a  onclick="selectBody()" class="btn btn-outline-info" style="height: 30px" th:if="${body} == '='">身体情况正常</a>
                                <a  onclick="selectBody()" class="btn btn-outline-info" style="height: 30px" th:if="${body} == '!='">身体情况异常</a>
                                <a  onclick="selectIstreatment()" class="btn btn-outline-info" style="height: 30px" th:if="${istreatment != 'true' && istreatment != 'false'}">就医</a>
                                <a  onclick="selectIstreatment()" class="btn btn-outline-info" style="height: 30px" th:if="${istreatment} == 'true'">已就医</a>
                                <a  onclick="selectIstreatment()" class="btn btn-outline-info" style="height: 30px" th:if="${istreatment} == 'false'">未就医</a>
                                <a  onclick="selectIsolated()" class="btn btn-outline-info" style="height: 30px" th:if="${isolated != 'true' && isolated != 'false'}">隔离情况</a>
                                <a  onclick="selectIsolated()" class="btn btn-outline-info" style="height: 30px" th:if="${isolated} == 'true'">已隔离</a>
                                <a  onclick="selectIsolated()" class="btn btn-outline-info" style="height: 30px" th:if="${isolated} == 'false'">未隔离</a>
                                <a  onclick="selectInschool()" class="btn btn-outline-info" style="height: 30px" th:if="${inschool != 'true' && inschool != 'false'}">在校情况</a>
                                <a  onclick="selectInschool()" class="btn btn-outline-info" style="height: 30px" th:if="${inschool} == 'true'">在校</a>
                                <a  onclick="selectInschool()" class="btn btn-outline-info" style="height: 30px" th:if="${inschool} == 'false'">不在校</a>
                                <a  onclick="selectInguan()" class="btn btn-outline-info" style="height: 30px" th:if="${inguan != 'true' && inguan != 'false'}">在莞情况</a>
                                <a  onclick="selectInguan()" class="btn btn-outline-info" style="height: 30px" th:if="${inguan} == 'true'">在莞</a>
                                <a  onclick="selectInguan()" class="btn btn-outline-info" style="height: 30px" th:if="${inguan} == 'false'">不在莞</a>
                                <input type="text" id ="searchKeyword" name="searchKeyword" style="height: 30px" required="required" th:placeholder="输入关键字搜索">
                                <a href="#" onclick='searchKeyword()' class="btn btn-outline-info" style="height: 30px">搜索</a>

                                <input name="auctionstarttime"
                                       type="text" id="star_time" class="nwinput" readonly="readonly" style="height: 30px" th:placeholder="'开始时间：'+${starTime}" onclick="selectDate(this,'yyyy-MM-dd hh:mm:ss')"/>

                                <input name="auctionendtime"
                                       type="text" id="end_time" class="nwinput" readonly="readonly" style="height: 30px" th:placeholder="'结束时间：'+${endTime}" onclick="selectDate(this,'yyyy-MM-dd hh:mm:ss')"/>
                                <a href="#" onclick='searchPage()' class="btn btn-outline-info" style="height: 30px">确定</a>

                                <a class="btn btn-outline-info" style="height: 30px" th:href="@{'/admin/dataexcel/'+${sort}+'/'+${starTime}+'/'+${endTime}+'/'+${body}+'/'+${istreatment}+'/'+${isolated}+'/'+${inschool}+'/'+${inguan}+'/'+${keyword}}" >导出</a>


                            </div>

                        </div>
                    </div>
                </div>
            </div>

            <input id="pageNum" type="hidden" name="pageNum" th:value="${pageNum}">
            <input id="sort" type="hidden" name="sort" th:value="${sort}">
            <input id="totalPages" type="hidden" name="totalPages" th:value="${totalPages}">
            <input id="starTime" type="hidden" name="starTime" th:value="${starTime}">
            <input id="endTime" type="hidden" name="endTime" th:value="${endTime}">
            <input id="body" type="hidden" name="body" th:value="${body}">
            <input id="istreatment" type="hidden" name="istreatment" th:value="${istreatment}">
            <input id="isolated" type="hidden" name="isolated" th:value="${isolated}">
            <input id="inschool" type="hidden" name="inschool" th:value="${inschool}">
            <input id="inguan" type="hidden" name="inguan" th:value="${inguan}">
            <input id="keyword" type="hidden" name="keyword" th:value="${keyword}">



            <div class="row-fluid">
                <div class="span12">

                    <table class="table table-hover">
                        <tbody>
                        <tr align="center">

                            <td><h4>id</h4></td>
                            <td><h4>时间</h4></td>
                            <td><h4>学号/工号</h4></td>
                            <td><h4>手机号</h4></td>
                            <td><h4>联系人</h4></td>
                            <td><h4>联系人电话</h4></td>
                            <td><h4>身体状况</h4></td>
                            <td><h4>是否就医</h4></td>
                            <td><h4>是否隔离</h4></td>
                            <td><h4>是否在校</h4></td>
                            <td><h4>是否在莞</h4></td>
                            <td><h4>所在地</h4></td>
                            <td><h4>体温</h4></td>


                        </tr>
                        <tr th:each="data:${datalist}" align="center">
                            <td th:text="${data.getId()}"></td>

                            <td th:text="${data.getDate()}"></td>
                            <td th:text="${data.getSno()}"></td>
                            <td th:text="${data.getTelephone()}"></td>
                            <td th:text="${data.getContacts()}"></td>
                            <td th:text="${data.getContacts_telephone()}"></td>
                            <td th:text="身体健康" th:if="${data.getBody()} == 0"></td>
                            <td th:text="发烧" th:if="${data.getBody()} == 1"></td>
                            <td th:text="咳嗽" th:if="${data.getBody()} == 2"></td>
                            <td th:text="头晕" th:if="${data.getBody()} == 3"></td>
                            <td th:text="腹泻" th:if="${data.getBody()} == 4"></td>
                            <td th:text="乏力" th:if="${data.getBody()} == 5"></td>
                            <td th:text="有两种及以上不良现象" th:if="${data.getBody()} == 6"></td>
                            <td th:text="已就医" th:if="${data.isIstreatment() eq true}"></td>
                            <td th:text="未就医" th:if="${data.isIstreatment() eq false}"></td>
                            <td th:text="已隔离" th:if="${data.isIsolated()} eq true"></td>
                            <td th:text="未隔离" th:if="${data.isIsolated()} eq false"></td>
                            <td th:text="在校" th:if="${data.isInschool()} eq true"></td>
                            <td th:text="不在校" th:if="${data.isInschool()} eq false"></td>
                            <td th:text="在莞" th:if="${data.isInguan()} eq true"></td>
                            <td th:text="不在莞" th:if="${data.isInguan()} eq false"></td>
                            <td th:text="${data.getLocation()}"></td>
                            <td th:text="${data.getTemperature()}"></td>

                        </tr>
                        </tbody>
                    </table>
                </div>
                <div class="pagination_area pull-right mt-5">
                    <ul>
                        <li><a  onclick="searchPage()" >确定</a></li>
                        <li><input id="searchPageNum" type="text" name="searchPageNum" required="required" placeholder="输入页数跳转">
                        </li>

                        <li><a  onclick="firstPage()" >首页</a></li>
                        <li><a  onclick="prePage()" ><i><</i></a>
                        </li>
                        <li><a><span th:text="${pageNum}"></span></a></li>
                        <li><a  onclick="nextPage()" ><i>></i></a>
                        </li>
                        <li><a  onclick="lastPage()" >尾页</a></li>
                    </ul>
                </div>
            </div>

            <div class="main-content-inner">

            </div>
        </div>
        <!-- main content area end -->

    </div>
</form>
<script th:src="@{/assets/js/vendor/jquery-2.2.4.min.js}"></script>
<script th:src="@{/assets/js/bootstrap.min.js}"></script>
<script th:src="@{/assets/js/metisMenu.min.js}"></script>
<script th:src="@{/assets/js/scripts.js}"></script>
<script th:src="@{/js/data.js}"></script>
<script th:src="@{/js/WebCalendar.js}"></script>
</body>

</html>